/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.autosalon.ui.automobil.action;

import com.autosalon.ui.automobil.Automobil;
import com.vaadin.data.Property;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.ui.Button.ClickEvent;

/**
 *Trida slozici při rozbaleni Comboboxu a naslednem naplneni comboboxu modelama podle vyrobce
 * @author Petr Kriegisch
 */
public class ComboBoxChangeEvent extends AbstractAutomobilAction implements Property.ValueChangeListener {

    public ComboBoxChangeEvent(Automobil automobil) {
        super(automobil);
    }

    @Override
    public void valueChange(ValueChangeEvent event) {
        // automobil.setCbModel(new ComboBox("Model"));
        automobil.naplnModely(automobil.getCbVyrobce().getValue());
    }

    @Override
    public void buttonClick(ClickEvent event) {
    }
}
